Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
I'm using an HTTP Location header to redirect to the URL of the same script, with the query string removed.

...
my $q = CGI::->new();
...
print $q->redirect(-url=>$q->url());

In Internet Explorer 4.01 SP1 this works as desired.

In Netscape Navigator 4.08 and 4.5 it results in a "document contains no data" error, as if Netscape doesn't understand the Location header, and expects the HTTP response to have content.

If I redirect to a different URL, it works fine in Netscape.

Any suggestions? confused

Sponsored Links
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Does the program run in IE or do you get no error page? You have to turn on error return pages on scripts in IE.


- Custom Web Development
http://www.JCSWebDev.com
Joined: Sep 2000
Posts: 755
P.I.T.A. / Programmer
P.I.T.A. / Programmer
Offline
Joined: Sep 2000
Posts: 755
Are you printing a regular header too ($q->header)?

If so, that could be the issue. I believe (don't remember for sure) that a redirect should be its own header.

--mark


"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan
Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
C_P:

The script works correctly in IE.

Mark:

Only the location header is printed, e.g.,

Status: 302 Moved
Date: Sat, 17 Mar 2001 01:26:26 GMT
Location: actual URL here

Joined: Aug 2000
Posts: 335
Member
Member
Offline
Joined: Aug 2000
Posts: 335
In case anyone's interested, I solved this by using a workaround based on a suggestion in a newsgroup.

I add a unique, dummy query string parameter to the URL:

Code
code:

It's ugly, but it works.

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 538
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 8
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)